package com.zc58s.config;

import java.io.IOException;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;

/**
 * 功能描述
 *
 * @author fujc-dev@qq.com
 * @date: 2023年11月13日 14:26
 */

public class MyClientHttpRequestInterceptorImpl implements ClientHttpRequestInterceptor {

    @Override
    public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
        System.out.println("自定义的拦截器开始。。。");
        ClientHttpResponse execute = execution.execute(request, body);
        System.out.println("自定义的拦截器结束。。。");
        return execute;
    }
}
